/*
 * @Author: january.cjy 
 * @Date: 2021-09-27 19:50:08 
 * @Last Modified by: january.cjy
 * @Last Modified time: 2021-09-27 19:51:41
 */
#pragma once

#include "clang/Basic/SourceManager.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendAction.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
#include "clang/Basic/Module.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Type.h"
namespace cmg{
    using namespace clang;
    class CmgPPCallbacks : public clang::PPCallbacks
    {
    public:
        typedef PPCallbacks base;
        CmgPPCallbacks(SourceManager &smgr);
        //在这里创建你自己的方法来访问宏定义,通过继承的方式
        virtual void InclusionDirective	(
            SourceLocation 	HashLoc,
            const Token & 	IncludeTok,
            StringRef 	FileName,
            bool 	IsAngled,
            CharSourceRange 	FilenameRange,
            const FileEntry * 	File,
            StringRef 	SearchPath,
            StringRef 	RelativePath,
            const clang::Module * 	Imported,
            SrcMgr::CharacteristicKind 	FileType 
            );
    private:
        SourceManager &sourceManager;
    };
}